You made arrangements to form a caravan heading back to the familiar lands of the west. Before you set off, you took stock of your travelling companions: Ephraim is familiar; you've traveled with him before. He has made this journey to the East in the past, making him unique among your group. His skin may be wrinkled and weatherbeaten, but his eyes are as sharp as ever. He never misses a deal, or a danger. Alexander, son of Asa, is an unfamiliar face, but you've heard of him in the few weeks you've spent in this place. Tales of his exploits and outburts in local gambling dens and seedier locales quickly made him notorious among your small group of outsider mechants, not to mention the natives. He looks very young, and seems to wear a perpetual scowl. Yishai is another matter. Yes, he adorns himself with clothes of many different colors; you might even call it ostentatious. But he hides his face behind another cloth, and rarely speaks. You spent weeks in the city, but until he joined your caravan that morning, you never even knew he was in the area. *page_break Besides arranging the purchase of your trade goods, how did you spend the remainder of your money during your time in the East? *temp reserve_funds *set reserve_funds false *temp available_funds *set available_funds funds *choice #Employing the services of a few extra guards, and obtaining higher-quality arms for them. *set guards +1 *label setFunds *set funds -500 *set available_funds funds *goto buy #Entertainment. I may never have a chance to return here; why not enjoy my time while I can? *set dedication %-20 *goto setFunds #Purchasing additional supplies, and replacing my beasts of burden with fresh stock. *set animals +1 *goto setFunds #Actually, I saved it. It's important to keep a certain amount of wealth in reserve, to always be prepared for future opportunities. *set reserve_funds true *set available_funds -500 *goto buy #"Remainder?" No, I came here to engage in profitable enterprise, and all my funds were devoted to that end. *set dedication %+20 *label buy *temp spices_price *temp dyes_price *temp metals_price *temp gems_price *temp rounding *set spices_price (70 - (shrewdness * (1/2))) *comment ****20-70 *set rounding "spices_price" *gosub round *set dyes_price (112 - (shrewdness * (3/4))) *comment ****37-112 *set rounding "dyes_price" *gosub round *set metals_price (250 - (shrewdness * (4/3))) *comment ****90-250 *set rounding "metals_price" *gosub round *set gems_price (((650 + shrewdness) / (50 + shrewdness)) * 44) *comment ****220-572 *set rounding "gems_price" *gosub round After a great deal of haggling, you arrange the following prices: *label prices Spices and incense for ${spices_price} per parcel. *line_break Cakes of dye and rolls of cloth for ${dyes_price} each. *line_break Blocks of valuable metals, jewelry, and other worked goods for ${metals_price} each. *line_break Precious gems for ${gems_price} per stone. At this point, you had ${available_funds} funds available to purchase goods. What exactly did you buy? *temp category *choice #Spices and incense. There is always demand for spices and incense. You can never seem to find enough of it. *set category "spices" *goto howmuch #Cloth and dyes. Exotic dyes and cloths will sell quite well back home. The indigo especially will be very valuable. *set category "dyes" *goto howmuch #Metals and jewelry. Worked goods such as jewelry, as well as precious metals, have less predictable prices, but you're still likely to make a good profit on them as long as you can make it far enough west. However, it's also made of sturdier stuff than the more delicate goods. *set category "metals" *goto howmuch #Precious gems. Gems are a riskier proposition. Their value can fluctuate greatly with the fashion of the day, but this can make them much more lucrative. However, they're also quite resilient and easy to protect. *set category "gems" *label howmuch And how many of these ${category} did you purchase? *temp quantity *temp cost *temp cat_price *set cat_price category & "_price" *choice #All that I could. *set quantity (available_funds / {cat_price}) *label determine_price *set rounding "quantity" *gosub round *setref category ({category} + quantity) *set cost (quantity * {cat_price}) *set available_funds -cost *set funds -cost *temp cat_outlay *set cat_outlay category & "_outlay" *setref cat_outlay ({cat_outlay} + cost) You spent ${cost} buying ${quantity} of the ${category}. Was that your last purchase? *choice #Yes. *goto end #No. *goto prices *selectable_if ((available_funds / {cat_price}) > 3) #I spent the majority of my funds. *set quantity ((available_funds / {cat_price}) * (2/3)) *goto determine_price *selectable_if ((available_funds / {cat_price}) > 5) #I spent a portion of my funds. *set quantity ((available_funds / {cat_price}) * (1/4)) *goto determine_price #Only one. *set quantity 1 *goto determine_price #Never mind. *goto prices *label end And so the caravan set off. *finish *label round *temp rounded *set rounded 0 *temp val *label roundloop *set val {rounding} *if (val - rounded) > 1 *set rounded +1 *goto roundloop *elseif (val - rounded) = 1 *comment Need to account for rounding an integer value. *set rounded +1 *goto roundfinish *else *label roundfinish *setref rounding rounded *return